﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Runtime.Serialization;
using System.ServiceModel;
using System.Text;
using Common;

namespace BusinessLogic
{
    // NOTE: You can use the "Rename" command on the "Refactor" menu to change the interface name "IProductWCF" in both code and config file together.
    [ServiceContract]
    public interface IProductWCF
    {
        [OperationContract]
        IEnumerable<Product> GetAllProducts();

        [OperationContract]
        Product GetProductById(int id);

        [OperationContract]
        IEnumerable<User_Ratings> GetProductRatings(int id);

        [OperationContract]
        IEnumerable<Comment> GetProductComments(int id);

        [OperationContract]
        void AddToCart(ShoppingCart sc);

        [OperationContract]
        IEnumerable<ShoppingCart> GetShoppingCartByUsername(string username);

        [OperationContract]
        void DeleteFromCart(ShoppingCart sc);

        [OperationContract]
        ShoppingCart GetShoppingCartProduct(int shoppingCartID);

        [OperationContract]
        void AddToOrders(Order order);

        [OperationContract]
        void AddToOrderDetails(OrderDetail od);

        [OperationContract]
        IEnumerable<Common.Order> GetOrder(string username);

        [OperationContract]
        IEnumerable<Common.OrderDetail> GetAllOrdersDetails(Guid orderID);

        [OperationContract]
        OrderDetail GetOrderDetail(int orderDetailID);

        [OperationContract]
        IEnumerable<Rating> GetRatingList();

        [OperationContract]
        void AddRating(User_Ratings ur);

        [OperationContract]
        void AddComment(Comment c);

        [OperationContract]
        void UpdateOrderDetail(OrderDetail od);
    }
}
